import request from '@/utils/request'

// 根据标签查询文章
export function listByTag(query) {
  return request({
    url: '/system/article/listByTag',
    method: 'get',
    params: query
  })
}

// 查询文章查询列表
export function listArticle(query) {
  return request({
    url: '/system/article/list',
    method: 'get',
    params: query
  })
}

// 查询文章查询列表(数据不分页)
export function nplistArticle(query) {
  return request({
    url: '/system/article/nplist',
    method: 'get',
    params: query
  })
}

// 查询热门文章查询列表
export function rmlistArticle(query) {
  return request({
    url: '/system/article/rmlist',
    method: 'get',
    params: query
  })
}

// 查询文章查询详细
export function getArticle(articleId) {
  return request({
    url: '/system/article/' + articleId,
    method: 'get'
  })
}

// 新增文章查询
export function addArticle(data) {
  return request({
    url: '/system/article',
    method: 'post',
    data: data
  })
}

// 修改文章查询
export function updateArticle(data) {
  return request({
    url: '/system/article',
    method: 'put',
    data: data
  })
}

// 删除文章查询
export function delArticle(articleId) {
  return request({
    url: '/system/article/' + articleId,
    method: 'delete'
  })
}
